<template>
	<view>
		<view style="width: 100%;height: 200upx;display: flex;background-color: #FF5555;">
			<view style="flex: 1;text-align: center;font-size: 32upx;font-weight: 555;color: #fff;">
				<view style="height: 100upx;line-height: 100upx;font-size: 42upx;">
					{{data.leiji_fenxiang}}
				</view>
				<view style="height: 100upx;">
					累计积分
				</view>
			</view>
			<view style="flex: 1;text-align: center;font-size: 32upx;font-weight: 555;color: #fff;">
				<view style="height: 100upx;line-height: 100upx;font-size: 42upx;">
					{{data.leiji_yitixian}}
				</view>
				<view style="height: 100upx;">
					累计提现
				</view>
			</view>
		</view>
		
		<view class="list">
			<view class="uni-list">
				<view class="uni-list-cell" v-for="(item,index) in data.fenxiang" :key="index">
					<view  style="position: relative; width: 100%;color: #666;">
						<view style="height: 60upx;line-height: 90upx;padding-left: 20upx;font-size: 34upx;">
							商品价格:{{item.total_fee}}
						</view>
						<view style="height: 65upx;padding-left: 20upx;">
							<!-- <text style="background-color: #b71c24;color: #ffffff;font-size: 20upx;padding: 4upx 8upx 2upx;">日常签到</text> -->
							<text style="font-size: 20upx;padding-left: 14upx;">{{item.log}}</text>
						</view>
						<view class="act">
							此单收益+{{item.num}}
						</view>
					</view>
				</view>
			</view>
		</view>
		<view v-if="code == 0" style="height: 100upx;color: #B81738;padding: 30upx;">
			<view style="font-size: 32upx;font-weight: 550;text-align: center;">
				暂无记录
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				data:{},
				openid:'',
			};
		},
		onLoad:function(){
			uni.showLoading()
			uni.getStorage({
				key: 'openid',
				success: (res) => {
					this.openid = res.data
					this.setAjax()
				},
				fail: () => {
					uni.navigateTo({
						url: '../login/login'
					});
				}
			});
		},
		methods:{
			setAjax(){
				uni.request({
					url: 'https://www.xiaonengxinxi.com/app/index.php?i=4&c=entry&m=ewei_shopv2&do=mobile&r=member.fenxiang&type=2&app=1',
					method: 'POST',
					data: {'openid':this.openid},
					header:{'Content-Type':'application/x-www-form-urlencoded'},
					success: res => {
						this.data = res.data
						uni.hideLoading()
					},
					fail: () => {},
					complete: () => {}
				});
			},
		}
	}
</script>

<style>
	.act {
		position: absolute;
		top: 35upx;
		right: 30upx;
		color: #b71c24;
	}
	.uni-list image {width:34upx;height:34upx;}
	.uni-list .text {position:absolute;left:84upx;font-size:26upx;}
	.uni-list {margin-top:20upx;}
	.uni-list:before,.uni-list:after {display:none;}
	.uni-list-cell:after {content:" ";position:absolute;left:0.5rem;right:0.5rem;bottom:-1px;height:1px;border-top:1px solid #ebebeb;color:#D9D9D9;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(0.5);-ms-transform:scaleY(0.5);transform:scaleY(0.5);background:none;}
	.uni-list-cell .right {font-size:24upx;color:#999;margin-right:20upx;}
	.uni-list .uni-list-cell:last-child:after {border:0;}
	.uni-list .uni-badge {margin-right:15px;background-color:#f55;}
</style>
